package cn.edu.zafu.bigdata.x.wupeng.h;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;

public class RandomAccessTest {
    public static void main(String[] args) throws IOException {
        RandomAccessFile file = new RandomAccessFile("files/invoice.txt","r");
        System.out.println(file.length());
//        file.seek(15);
//        System.out.println(file.readInt());
        file.seek(8);
        System.out.println(file.readChar());
        System.out.println(file.readInt());
    }
}
